﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FTP_progress
{
    class AddControls
    {

    public void AddControl(GroupBox gb, int n)
        {

            for (int i = 0; i < n; i++)
            {
               //添加No.标签
                Label lbl = new Label();
                lbl.Name = "NO." + (i + 1) + "_lbl";
                lbl.Text = (i + 1).ToString();
                lbl.Location = new System.Drawing.Point(8, 42+n*27);


                lbl.Size = new System.Drawing.Size(50, 24);
                lbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
                lbl.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));           
                lbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;

                gb.Controls.Add(lbl);

                //添加Robot标签
                Label lbl1 = new Label();
                lbl1.Name = "NO." + (i + 1) + "_lbl";
                lbl1.Text = (i + 1).ToString();
                lbl1.Location = new System.Drawing.Point(8, 42 + n * 27);


                lbl1.Size = new System.Drawing.Size(50, 24);
                lbl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
                lbl1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                lbl1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;





            }

        }












    }
}
